﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace MotoreDataBase
{
    public enum TipoDatiDb
    {
        [StringValue("bigint")]
        BIGINT,
        [StringValue("binary")]
        BINARY,
        [StringValue("bit")]
        BIT,
        [StringValue("char")]
        CHAR,
        [StringValue("date")]
        DATE,
        [StringValue("datetime")]
        DATETIME,
        [StringValue("datetime2")]
        DATETIME2,
        [StringValue("datetimeoffset")]
        DATETIMEOFFSET,
        [StringValue("decimal")]
        DECIMAL,
        [StringValue("float")]
        FLOAT,
        [StringValue("geography")]
        GEOGRAPHY,
        [StringValue("geometry")]
        GEOMETRY,
        [StringValue("hierarchyid")]
        HIERARCHYID,
        [StringValue("image")]
        IMAGE,
        [StringValue("int")]
        INT,
        [StringValue("money")]
        MONEY,
        [StringValue("nchar")]
        NCHAR,
        [StringValue("ntext")]
        NTEXT,
        [StringValue("numeric")]
        NUMERIC,
        [StringValue("nvarchar")]
        NVARCHAR,
        [StringValue("nvarchar(MAX)")]
        NVARCHAR_MAX,
        [StringValue("real")]
        REAL,
        [StringValue("smalldatetime")]
        SMALLDATETIME,
        [StringValue("smallint")]
        SMALLINT,
        [StringValue("smallmoney")]
        SMALLMONEY,
        [StringValue("sql_variant")]
        SQL_VARIANT,
        [StringValue("text")]
        TEXT,
        [StringValue("time")]
        TIME,
        [StringValue("timestamp")]
        TIMESTAMP,
        [StringValue("tinyint")]
        TINYINT,
        [StringValue("uniqueidentifier")]
        UNIQUEIDENTIFIER,
        [StringValue("varbinary")]
        VARBINARY,
        [StringValue("varbinary(MAX)")]
        VARBINARY_MAX,
        [StringValue("varchar")]
        VARCHAR,
        [StringValue("varchar(MAX)")]
        VARCHAR_MAX,
        [StringValue("xml")]
        XML
    };

    /// <summary>
    /// This attribute is used to represent a string value
    /// for a value in an enum.
    /// </summary>
    public class StringValueAttribute : Attribute
    {

        #region Properties

        /// <summary>
        /// Holds the stringvalue for a value in an enum.
        /// </summary>
        public string StringValue { get; protected set; }

        #endregion

        #region Constructor
        /// <summary>
        /// Constructor used to init a StringValue Attribute
        /// </summary>
        /// <param name="value"></param>
        public StringValueAttribute(string value)
        {
            this.StringValue = value;
        }
        #endregion

        
    }



}
